package org.csu.mypetstore.persistence;

import org.apache.ibatis.annotations.Param;
import org.csu.mypetstore.domain.Order;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface OrderMapper {
    List<Order> getOrdersByUsername(String username);

    Order getOrder(int orderId);

    void insertOrder(Order order);

    void insertOrderStatus(Order order);

    List<Order> getOrders();

    List<Order> getOrdersByOrderdate(String orderdate);

    List<Order> getOrdersByUsernameAndOrderdate(@Param("userid") String username,@Param("orderdate") String orderdate);

    void updatePaymentAndBillingAndShipping(Order order);

    void removeOrder(int orderId);

    List<Order> getNumberOfTotalPriceBetweenAToB(@Param("A") BigDecimal A,@Param("B") BigDecimal B);
}
